package com.qst.service.impl;

import com.qst.domain.User;
import com.qst.mapper.UserMapper;
import com.qst.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service // == @Component  用于把对当前修饰的类创建出来，并存放到Spring容器中。
public class UserServiceImpl implements UserService {
    // 注入UserMapper对象
    @Autowired(required = false)
    private UserMapper userMapper;
    // 通过User的用户账号和用户密码查询用户信息

    @Override
    public User login(User user) {
        return userMapper.login(user);
    }
}